package com.zlict.admin.service.impl;

import java.util.List;
import com.zlict.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zlict.admin.mapper.RdFinanceSubjectMapper;
import com.zlict.admin.domain.RdFinanceSubject;
import com.zlict.admin.service.IRdFinanceSubjectService;

/**
 * 财务管理-科目维护Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class RdFinanceSubjectServiceImpl implements IRdFinanceSubjectService 
{
    @Autowired
    private RdFinanceSubjectMapper rdFinanceSubjectMapper;

    /**
     * 查询财务管理-科目维护
     * 
     * @param id 财务管理-科目维护主键
     * @return 财务管理-科目维护
     */
    @Override
    public RdFinanceSubject selectRdFinanceSubjectById(Long id)
    {
        return rdFinanceSubjectMapper.selectRdFinanceSubjectById(id);
    }

    /**
     * 查询财务管理-科目维护列表
     * 
     * @param rdFinanceSubject 财务管理-科目维护
     * @return 财务管理-科目维护
     */
    @Override
    public List<RdFinanceSubject> selectRdFinanceSubjectList(RdFinanceSubject rdFinanceSubject)
    {
        return rdFinanceSubjectMapper.selectRdFinanceSubjectList(rdFinanceSubject);
    }

    /**
     * 新增财务管理-科目维护
     * 
     * @param rdFinanceSubject 财务管理-科目维护
     * @return 结果
     */
    @Override
    public int insertRdFinanceSubject(RdFinanceSubject rdFinanceSubject)
    {
        rdFinanceSubject.setCreateTime(DateUtils.getNowDate());
        return rdFinanceSubjectMapper.insertRdFinanceSubject(rdFinanceSubject);
    }

    /**
     * 修改财务管理-科目维护
     * 
     * @param rdFinanceSubject 财务管理-科目维护
     * @return 结果
     */
    @Override
    public int updateRdFinanceSubject(RdFinanceSubject rdFinanceSubject)
    {
        rdFinanceSubject.setUpdateTime(DateUtils.getNowDate());
        return rdFinanceSubjectMapper.updateRdFinanceSubject(rdFinanceSubject);
    }

    /**
     * 批量删除财务管理-科目维护
     * 
     * @param ids 需要删除的财务管理-科目维护主键
     * @return 结果
     */
    @Override
    public int deleteRdFinanceSubjectByIds(Long[] ids)
    {
        return rdFinanceSubjectMapper.deleteRdFinanceSubjectByIds(ids);
    }

    /**
     * 删除财务管理-科目维护信息
     * 
     * @param id 财务管理-科目维护主键
     * @return 结果
     */
    @Override
    public int deleteRdFinanceSubjectById(Long id)
    {
        return rdFinanceSubjectMapper.deleteRdFinanceSubjectById(id);
    }
}
